package es.albarregas.controladores;

import java.io.IOException;
import java.util.Collection;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import es.albarregas.dao.ProductoDAO;
import es.albarregas.modelo.ModelFacade;
import es.albarregas.modelo.Producto;



public class CrlProcesarEditarProducto extends HttpServlet {
	private static final long serialVersionUID = 1L;
   
    public CrlProcesarEditarProducto() {
        super();
        // TODO Auto-generated constructor stub
    }
    
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request, response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

		//REALIZAR VALIDACIONES			
					
			
			ModelFacade.actualizarProducto(request);
			response.sendRedirect("VisListarProductosAdmin.jsp");
			
	}

}
